import type { ProColumns } from '@ant-design/pro-table';
export type columnsDataType = {
  createBy?: string;
  createTime: string;
  delFlag: number;
  description: string;
  endTime: string;
  limitedField: string;
  name: string;
  number: number;
  positionNo: string;
  restrictedPurchase: number;
  serialNo: string;
  startTime: string;
  status: number;
  tenantId?: string;
  type: number;
  updateBy?: string;
  updateTime?: string;
};
const columnsData: ProColumns<columnsDataType>[] = [
  // table里面的内容
  {
    title: '序号',
    dataIndex: 'order',
    valueType: 'indexBorder',
    hideInSearch: true,
    width: 50,
    fixed: 'left',
  },
  {
    title: '权益名',
    dataIndex: 'name',
    width: 160,
    fixed: 'left',
  },
  {
    title: '权益类型',
    dataIndex: 'type',
    valueType: 'select',
    width: 100,
    valueEnum: {
      1: {
        text: '票务',
      },
      2: {
        text: '商品',
      },
    },
  },
  {
    title: '发布状态',
    dataIndex: 'status',
    valueType: 'select',
    width: 100,
    valueEnum: {
      0: {
        text: '已发布',
      },
      1: {
        text: '未发布',
      },
    },
  },
  {
    title: '适用主题',
    dataIndex: 'limitedField',
    hideInSearch: true,
    width: 200,
  },
  {
    title: '数量',
    dataIndex: 'number',
    hideInSearch: true,
    width: 160,
  },
  {
    title: '每人限购数量',
    dataIndex: 'restrictedPurchase',
    hideInSearch: true,
    width: 160,
  },
  {
    title: '生效时间',
    dataIndex: 'startTime',
    valueType: 'dateTime',
    hideInSearch: true,
    width: 160,
  },
  {
    title: '失效时间',
    dataIndex: 'endTime',
    valueType: 'dateTime',
    hideInSearch: true,
    width: 160,
  },
  {
    title: '操作',
    dataIndex: 'action',
    hideInSearch: true,
    width: 200,
    fixed: 'right',
  },
];

export default columnsData;
